home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / tex / bk12.doc < prev    next >
Encoding:
Text File  |  1986-12-16  |  18.1 KB  |  434 lines

  1. % BOOK DOCUMENT STYLE -- Released 4 September 1986
  2. %    for LaTeX version 2.09
  3. % Copyright (C) 1986 by Leslie Lamport
  4.  
  5. % PREPARING A FOREIGN LANGUAGE VERSION:
  6. %
  7. % This document style is for documents prepared in the English language.
  8. % To prepare a version for another language, various English words must
  9. % be replaced.  All the English words that required replacement are
  10. % indicated below, where we give the name of the command in which the
  11. % words appear, and the entire line containing the word(s), with the
  12. % actual words underlined.
  13. % \part:
  14. %       \huge\bf Part \thepart         %   THEN Print 'Part' and number
  15. %                ~~~~
  16. % \appendix:
  17. %   \def\@chapapp{Appendix}
  18. %                 ~~~~~~~~
  19.  
  20. %  ****************************************
  21. %  *               FONTS                  *
  22. %  ****************************************
  23. %
  24.  
  25. \lineskip 1pt            % \lineskip is 1pt for all font sizes.
  26. \normallineskip 1pt
  27. \def\baselinestretch{1}
  28.  
  29. % Each size-changing command \SIZE executes the command
  30. %        \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
  31. % where:
  32. %   BASELINESKIP = Normal value of \baselineskip for that size.  (Actual 
  33. %                  value will be \baselinestretch * BASELINESKIP.)
  34. %
  35. %  \FONTSIZE     = Name of font-size command.  The currently available
  36. %                  (preloaded) font sizes are: \vpt (5pt), \vipt (6pt),
  37. %                  \viipt (etc.), \viiipt, \ixpt, \xpt, \xipt, \xiipt,
  38. %                  \xivpt, \xviipt, \xxpt, \xxvpt.
  39. %  \@FONTSIZE    = The same as the font-size command except with an
  40. %                  '@' in front---e.g., if \FONTSIZE = \xivpt then
  41. %                  \@FONTSIZE = \@xivpt.
  42. %
  43. % For reasons of efficiency that needn't concern the designer,
  44. % the document style defines \@normalsize instead of \normalsize .  This is
  45. % done only for \normalsize, not for any other size-changing commands.
  46.  
  47. \def\@normalsize{\@setsize\normalsize{14.5pt}\xiipt\@xiipt
  48. \abovedisplayskip 12pt plus3pt minus7pt%
  49. \belowdisplayskip \abovedisplayskip
  50. \abovedisplayshortskip  \z@ plus3pt%   
  51. \belowdisplayshortskip  6.5pt plus3.5pt minus3pt}
  52.  
  53. \def\small{\@setsize\small{13.6pt}\xipt\@xipt
  54. \abovedisplayskip 11pt plus3pt minus6pt%
  55. \belowdisplayskip \abovedisplayskip
  56. \abovedisplayshortskip  \z@ plus3pt%   
  57. \belowdisplayshortskip  6.5pt plus3.5pt minus3pt
  58. \def\@listi{\parsep 4.5pt plus 2pt minus 1pt
  59.             \itemsep \parsep
  60.             \topsep 9pt plus 3pt minus 5pt}}
  61.  
  62. \def\footnotesize{\@setsize\footnotesize{12pt}\xpt\@xpt
  63. \abovedisplayskip 10pt plus2pt minus5pt%
  64. \belowdisplayskip \abovedisplayskip
  65. \abovedisplayshortskip  \z@ plus3pt%   
  66. \belowdisplayshortskip  6pt plus3pt minus3pt
  67. \def\@listi{\topsep 6pt plus 2pt minus 2pt\parsep 3pt plus 2pt minus 1pt
  68. \itemsep \parsep}}
  69.  
  70. \def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt}
  71. \def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
  72. \def\large{\@setsize\large{18pt}\xivpt\@xivpt}
  73. \def\Large{\@setsize\Large{22pt}\xviipt\@xviipt}
  74. \def\LARGE{\@setsize\LARGE{25pt}\xxpt\@xxpt}
  75. \def\huge{\@setsize\huge{30pt}\xxvpt\@xxvpt}
  76. \let\Huge=\huge
  77.  
  78. \normalsize  % Choose the normalsize font.
  79.  
  80.  
  81. %  ****************************************
  82. %  *            PAGE LAYOUT               *
  83. %  ****************************************
  84. %
  85. % All margin dimensions measured from a point one inch from top and side
  86. % of page.  
  87.  
  88. % SIDE MARGINS:
  89. \oddsidemargin .25in      % Left margin on odd-numbered pages.
  90. \evensidemargin 1.25in      % Left margin on even-numbered pages.
  91.  
  92. \marginparwidth 1in    %   Width of marginal notes.
  93. \marginparsep 7pt        % Horizontal space between outer margin and 
  94.                          % marginal note
  95.  
  96.  
  97. % VERTICAL SPACING:        
  98.                          % Top of page:
  99. \topmargin .73in         %    Nominal distance from top of page to top of
  100.                          %    box containing running head.
  101. \headheight 12pt         %    Height of box containing running head.
  102. \headsep .275in          %    Space between running head and text.
  103. % \topskip = 10pt        %    '\baselineskip' for first line of page.
  104.                          % Bottom of page:
  105. \footskip 30pt           %    Distance from baseline of box containing foot 
  106.                          %    to baseline of last line of text.
  107.  
  108.  
  109. % DIMENSION OF TEXT:
  110. % 24 Jun 86: changed to explicitly compute \textheight to avoid roundoff.
  111. % The value of the multiplier was calculated as the floor of the
  112. % old \textheight minus \topskip, divided by \baselineskip for \normalsize.
  113. % The old value of \textheight was 536.5pt.
  114. % \textheight is the height of text (including footnotes and figures, 
  115. % excluding running head and foot).
  116.  
  117. \textheight = 36\baselineskip
  118. \advance\textheight by \topskip
  119. \textwidth 5in           % Width of text line.
  120.                          % For two-column mode: 
  121. \columnsep 10pt          %    Space between columns 
  122. \columnseprule 0pt       %    Width of rule between columns.
  123.  
  124. % A \raggedbottom command causes 'ragged bottom' pages: pages set to
  125. % natural height instead of being stretched to exactly \textheight.
  126.  
  127. % FOOTNOTES:
  128.  
  129. \footnotesep 8.4pt    % Height of strut placed at the beginning of every
  130.                       % footnote = height of normal \footnotesize strut,
  131.                       % so no extra space between footnotes.
  132.  
  133. \skip\footins 10.8pt plus 4pt minus 2pt  % Space between last line of text and 
  134.                                          % top of first footnote.
  135.  
  136. % FLOATS: (a float is something like a figure or table)
  137. %
  138. %  FOR FLOATS ON A TEXT PAGE:
  139. %
  140. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  141. \floatsep 14pt plus 2pt minus 4pt        % Space between adjacent floats moved
  142.                                          % to top or bottom of text page.
  143. \textfloatsep 20pt plus 2pt minus 4pt    % Space between main text and floats
  144.                                          % at top or bottom of page.
  145. \intextsep 14pt plus 4pt minus 4pt       % Space between in-text figures and 
  146.                                          % text.
  147. \@maxsep 20pt                            % The maximum of \floatsep, 
  148.                                          % \textfloatsep and \intextsep (minus
  149.                                          % the stretch and shrink).
  150. %    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
  151. \dblfloatsep 14pt plus 2pt minus 4pt     % Same as \floatsep for double-column
  152.                                          % figures in two-column mode.
  153. \dbltextfloatsep 20pt plus 2pt minus 4pt % \textfloatsep for double-column 
  154.                                          % floats.
  155. \@dblmaxsep 20pt                         % The maximum of \dblfloatsep and 
  156.                                          % \dbltexfloatsep.
  157.  
  158. %  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
  159. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  160. \@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must be    
  161.                          % 0pt plus ...)                                    
  162. \@fpsep 10pt plus 2fil    % Space between floats on float page/column.       
  163. \@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column. (Must be 
  164.                          % 0pt plus ... )                                   
  165.  
  166. %   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
  167. \@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt plus ...)
  168. \@dblfpsep 10pt plus 2fil % Space between floats on float page.
  169. \@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be 
  170.                          % 0pt plus ... )                                   
  171. % MARGINAL NOTES:
  172. %
  173. \marginparpush 7pt       % Minimum vertical separation between two marginal 
  174.                          % notes.
  175.  
  176.  
  177. %  ****************************************
  178. %  *           PARAGRAPHING               *
  179. %  ****************************************
  180. %
  181. \parskip 0pt plus 1pt              % Extra vertical space between paragraphs.
  182. \parindent 1.5em                   % Width of paragraph indentation.
  183. \topsep 10pt plus 4pt minus 6pt    % Extra vertical space, in addition to 
  184.                                    % \parskip, added above and below list and
  185.                                    % paragraphing environments.
  186. \partopsep 3pt plus 2pt minus 2pt  % Extra vertical space, in addition to 
  187.                                    % \parskip and \topsep, added when user
  188.                                    % leaves blank line before environment.
  189. \itemsep 5pt plus 2.5pt minus 1pt  % Extra vertical space, in addition to
  190.                                    % \parskip, added between list items.
  191.  
  192. % The following page-breaking penalties are defined
  193.  
  194. \@lowpenalty   51      % Produced by \nopagebreak[1] or \nolinebreak[1]
  195. \@medpenalty  151      % Produced by \nopagebreak[2] or \nolinebreak[2]
  196. \@highpenalty 301      % Produced by \nopagebreak[3] or \nolinebreak[3]
  197.  
  198. \@beginparpenalty -\@lowpenalty    % Before a list or paragraph environment.
  199. \@endparpenalty   -\@lowpenalty    % After a list or paragraph environment.
  200. \@itempenalty     -\@lowpenalty    % Between list items.
  201.  
  202. % \clubpenalty         % 'Club line'  at bottom of page.
  203. % \widowpenalty        % 'Widow line' at top of page.
  204. % \displaywidowpenalty % Math display widow line.
  205. % \predisplaypenalty   % Breaking before a math display.
  206. % \postdisplaypenalty  % Breaking after a math display.
  207. % \interlinepenalty    % Breaking at a line within a paragraph.
  208. % \brokenpenalty       % Breaking after a hyphenated line.
  209.  
  210.  
  211. %    ****************************************
  212. %    *        CHAPTERS AND SECTIONS         *
  213. %    ****************************************
  214. %
  215.  
  216. \def\part{\cleardoublepage   % Starts new page.
  217.    \thispagestyle{plain}     % Page style of part page is 'plain'
  218.   \if@twocolumn              % IF two-column style
  219.      \onecolumn              %  THEN \onecolumn
  220.      \@tempswatrue           %       @tempswa := true
  221.     \else \@tempswafalse     %  ELSE @tempswa := false
  222.   \fi                        % FI
  223.   \hbox{}\vfil               % Add fil glue to center title  
  224.   \bgroup  \centering        % BEGIN centering
  225.   \secdef\@part\@spart}     
  226.  
  227. \def\@part[#1]#2{\ifnum \c@secnumdepth >-2\relax  % IF secnumdepth > -2
  228.         \refstepcounter{part}                     %   THEN step part counter
  229.         \addcontentsline{toc}{part}{\thepart      %        add toc line
  230.         \hspace{1em}#1}\else                      %   ELSE add unnumbered line
  231.         \addcontentsline{toc}{part}{#1}\fi        % FI
  232.    \markboth{}{}
  233.     \ifnum \c@secnumdepth >-2\relax  % IF secnumdepth > -2
  234.       \huge\bf Part \thepart         %   THEN Print 'Part' and number
  235.     \par                             %         in \huge bold.
  236.     \vskip 20pt \fi                  %        Add space before title.
  237.     \Huge \bf                        % FI
  238.     #1\@endpart}                     % Print Title in \Huge bold.
  239.     
  240. % \@endpart finishes the part page
  241. %
  242. \def\@endpart{\par\egroup     % END centering 
  243.    \vfil\newpage              % End page with 1fil glue.
  244.    \if@twoside                % IF twoside printing
  245.        \hbox{}                %   THEN Produce totally blank page
  246.        \thispagestyle{empty}  
  247.        \newpage        
  248.    \fi                        % FI
  249.    \if@tempswa                % IF @tempswa = true       
  250.      \twocolumn               %   THEN \twocolumn 
  251.    \fi}                       % FI
  252.  
  253. \def\@spart#1{\Huge \bf                      % Print title in \huge boldface
  254.    #1\@endpart}
  255.  
  256. % \@makechapterhead {TEXT} : Makes the heading for the \chapter command.
  257. %
  258.  
  259. \def\@makechapterhead#1{             % Heading for \chapter command
  260.   \vspace*{50pt}                     % Space at top of text page.
  261.   { \parindent 0pt \raggedright 
  262.     \ifnum \c@secnumdepth >\m@ne     % IF secnumdepth > -1 THEN
  263.       \huge\bf \@chapapp{} \thechapter % Print 'Chapter' and number.
  264.       \par 
  265.       \vskip 20pt \fi                  % Space between number and title.
  266.     \Huge \bf                        % Title.
  267.     #1\par 
  268.     \nobreak                         % TeX penalty to prevent page break.
  269.     \vskip 40pt                      % Space between title and text.
  270.   } }
  271.  
  272. % \@makeschapterhead {TEXT} : Makes the heading for the \chapter* command.
  273. %
  274.  
  275. \def\@makeschapterhead#1{             % Heading for \chapter* command
  276.   \vspace*{50pt}                     % Space at top of page.
  277.   { \parindent 0pt \raggedright 
  278.     \Huge \bf                        % Title.
  279.     #1\par 
  280.     \nobreak                         % TeX penalty to prevent page break.
  281.     \vskip 40pt                      % Space between title and text.
  282.   } }
  283.  
  284. % \secdef{UNSTARCMDS}{STARCMDS} :
  285. %    When defining a \chapter or \section command without using
  286. %    \@startsection, you can use \secdef as follows:
  287. %       \def\chapter { ... \secdef \CMDA \CMDB }
  288. %       \def\CMDA    [#1]#2{ ...   % Command to define \chapter[...]{...}
  289. %       \def\CMDB    #1{ ...       % Command to define \chapter*{...}
  290.  
  291. \def\chapter{\cleardoublepage      % Starts new page.
  292.    \thispagestyle{plain}     % Page style of chapter page is 'plain'
  293.    \global\@topnum\z@        % Prevents figures from going at top of page.
  294.    \@afterindentfalse        % Suppresses indent in first paragraph.  Change
  295.    \secdef\@chapter\@schapter}   % to \@afterindenttrue to have indent.
  296.  
  297. \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
  298.         \refstepcounter{chapter}
  299.         \typeout{\@chapapp\space\thechapter.}
  300.         \addcontentsline{toc}{chapter}{\protect
  301.         \numberline{\thechapter}#1}\else
  302.       \addcontentsline{toc}{chapter}{#1}\fi
  303.    \chaptermark{#1}
  304.    \addtocontents{lof}{\protect\addvspace{10pt}} % Adds between-chapter space
  305.    \addtocontents{lot}{\protect\addvspace{10pt}} % to lists of figs & tables.
  306.    \if@twocolumn                                 % Tests for two-column mode.  
  307.            \@topnewpage[\@makechapterhead{#2}]  
  308.      \else \@makechapterhead{#2}
  309.            \@afterheading                  % Routine called after chapter and
  310.      \fi}                                  % section heading.
  311.  
  312. \def\@schapter#1{\if@twocolumn \@topnewpage[\@makeschapterhead{#1}]
  313.         \else \@makeschapterhead{#1} 
  314.               \@afterheading\fi}
  315.  
  316. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} 
  317. %            optional * [ALTHEADING]{HEADING}
  318. %    Generic command to start a section.  
  319. %    NAME       : e.g., 'subsection'
  320. %    LEVEL      : a number, denoting depth of section -- e.g., chapter=1,
  321. %                 section = 2, etc.  A section number will be printed if
  322. %                 and only if LEVEL < or = the value of the secnumdepth
  323. %                 counter.
  324. %    INDENT     : Indentation of heading from left margin
  325. %    BEFORESKIP : Absolute value = skip to leave above the heading.  
  326. %                 If negative, then paragraph indent of text following 
  327. %                 heading is suppressed.
  328. %    AFTERSKIP  : if positive, then skip to leave below heading,
  329. %                       else - skip to leave to right of run-in heading.
  330. %    STYLE      : commands to set style
  331. %  If '*' missing, then increments the counter.  If it is present, then
  332. %  there should be no [ALTHEADING] argument.  A sectioning command
  333. %  is normally defined to \@startsection + its first six arguments.
  334.  
  335. \def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus 
  336.     -.2ex}{2.3ex plus .2ex}{\Large\bf}}
  337. \def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus 
  338.    -.2ex}{1.5ex plus .2ex}{\large\bf}}
  339. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus 
  340.    -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}}
  341. \def\paragraph{\@startsection
  342.      {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize\bf}}
  343. \def\subparagraph{\@startsection
  344.      {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus 
  345.      .2ex}{-1em}{\normalsize\bf}}
  346.  
  347. % Default initializations of \...mark commands.  (See below for their
  348. % us in defining page styles.
  349. %
  350.  
  351. \def\chaptermark#1{}
  352. % \def\sectionmark#1{}           % Preloaded definitions
  353. % \def\subsectionmark#1{}
  354. % \def\subsubsectionmark#1{}
  355. % \def\paragraphmark#1{}
  356. % \def\subparagraphmark#1{}
  357.  
  358. % The value of the counter secnumdepth gives the depth of the
  359. % highest-level sectioning command that is to produce section numbers.
  360. %
  361.  
  362. \setcounter{secnumdepth}{2}
  363.  
  364. % APPENDIX
  365. %
  366. % The \appendix command must do the following:
  367. %    -- reset the chapter counter to zero
  368. %    -- set \@chapapp to Appendix (for messages)
  369. %    -- redefine the chapter counter to produce appendix numbers
  370. %    -- reset the section counter to zero
  371. %    -- redefine the \chapter command if appendix titles and headings are
  372. %       to look different from chapter titles and headings.
  373.  
  374. \def\appendix{\par
  375.   \setcounter{chapter}{0}
  376.   \setcounter{section}{0}
  377.   \def\@chapapp{Appendix}
  378.   \def\thechapter{\Alph{chapter}}}
  379.  
  380.  
  381. %    ****************************************
  382. %    *                LISTS                 *
  383. %    ****************************************
  384. %
  385.  
  386. % The following commands are used to set the default values for the list
  387. % environment's parameters. See the LaTeX manual for an explanation of
  388. % the meanings of the parameters.  Defaults for the list environment are
  389. % set as follows.  First, \rightmargin, \listparindent and \itemindent
  390. % are set to 0pt.  Then, for a Kth level list, the command \@listK is
  391. % called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
  392. % called for a third-level list.)  By convention, \@listK should set
  393. % \leftmargin to \leftmarginK.
  394. %
  395. % For efficiency, level-one list's values are defined at top level, and
  396. % \@listi is defined to set only \leftmargin.
  397.  
  398. \leftmargini 2.5em
  399. \leftmarginii 2.2em     % > \labelsep + width of '(m)'
  400. \leftmarginiii 1.87em   % > \labelsep + width of 'vii.'
  401. \leftmarginiv 1.7em     % > \labelsep + width of 'M.'
  402. \leftmarginv 1em
  403. \leftmarginvi 1em
  404.  
  405. \leftmargin\leftmargini
  406. \labelsep .5em
  407. \labelwidth\leftmargini\advance\labelwidth-\labelsep
  408. \parsep 5pt plus 2.5pt minus 1pt
  409.  
  410. \def\@listi{\leftmargin\leftmargini}
  411.  
  412. \def\@listii{\leftmargin\leftmarginii
  413.    \labelwidth\leftmarginii\advance\labelwidth-\labelsep
  414.    \topsep 5pt plus 2.5pt minus 1pt
  415.    \parsep 2.5pt plus 1pt minus 1pt
  416.    \itemsep \parsep}
  417.  
  418. \def\@listiii{\leftmargin\leftmarginiii
  419.     \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
  420.     \topsep 2.5pt plus 1pt minus 1pt 
  421.     \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
  422.     \itemsep \topsep}
  423.  
  424. \def\@listiv{\leftmargin\leftmarginiv
  425.      \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
  426.  
  427. \def\@listv{\leftmargin\leftmarginv
  428.      \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
  429.  
  430. \def\@listvi{\leftmargin\leftmarginvi
  431.      \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
  432.  
  433.